package cn.iocoder.an.module.business.dal.mysql.auditplan;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.auditplan.AuditPlanDO;
import cn.iocoder.an.module.business.dal.dataobject.auditplanarea.AuditPlanAreaDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.auditplan.vo.*;

/**
 * 审核计划 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface AuditPlanMapper extends BaseMapperX<AuditPlanDO> {

    default PageResult<AuditPlanDO> selectPage(AuditPlanPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AuditPlanDO>()
                .eqIfPresent(AuditPlanDO::getLevelId, reqVO.getLevelId())
                .eqIfPresent(AuditPlanDO::getBelongType, reqVO.getBelongType())
                .eqIfPresent(AuditPlanDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(AuditPlanDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AuditPlanDO::getId));
    }

}